<?php

class actSeed extends action
{
	public function execute($m)
	{
		$this->checkKey($this->getInput('k')) or $this->doAjaxError();
		$this->setNewKey();
		
		$aM = $m->getModel('actions');
		
		$time = time();
		$actions = $aM->getSince($this->getSession('time_last'));
		
		foreach ($actions AS $type => $sActions)
		{
			$this->addOutput('>' . $type);
			
			switch ($type)
			{
				case 'contacts';
					$this->addOutput(implode("\n", $sActions));
				break;
				
			} // end switch
			
		} // end foreach
		
		$this->setSession('time_last', $time);
		
		$this->finish();
		
	} // end function
	
} // end class

$_ = 'actSeed';

?>